# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=checksec-rs
pkgver=0.0.9
pkgrel=3
pkgdesc="Fast multi-platform (ELF/PE/MachO) binary checksec"
url="https://github.com/etke/checksec.rs"
arch="all"
license="Apache-2.0"
makedepends="cargo cargo-auditable"
source="$pkgname-$pkgver.tar.gz::https://github.com/etke/checksec.rs/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/checksec.rs-$pkgver"
options="net"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release \
		--no-default-features --features="elf,color"
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/checksec -t "$pkgdir"/usr/bin/
}

sha512sums="
fbc8382abadf39108eca5d879e709f26c4f8cfb8813161279f71140052b9f5992e93a7188755d18f3815abe85fe3dcbb1c6cc64c64d1b983f7a3258c8e29ae16  checksec-rs-0.0.9.tar.gz
"
